package com.demo.web;

import com.demo.dto.BaseResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by liushaokang on 2017/3/14.
 */

@Controller
@RequestMapping("/admin/auth")
public class AuthController {

    @RequestMapping(value = "/authok", produces = "application/json;charset=utf-8")
    public @ResponseBody
    BaseResult authSuccess() {
        return new BaseResult(true, "auth success", 200);
    }

    @RequestMapping(value = "/authfauire", produces = "application/json;charset=utf-8")
    public @ResponseBody BaseResult authFauire() {
        return new BaseResult(false, "auth fauire", 403);
    }

    @RequestMapping(value = "/authlogin", produces = "application/json;charset=utf-8")
    public @ResponseBody BaseResult authLogin() {
        return  new BaseResult(false, "no login", 403);
    }
}
